import request from "@/utils/request";
// 获取全部
export const getRoom = (RoomRequestData) => {
  return request.request({
    url: `/admin/room/pages`,
    method: "POST",
    data:RoomRequestData,
  });
}

//更加id查询
export const getRoomOneById = (id) => {
  return request.request({
    url: `/admin/room/one/${id}`,
    method: "GET",
  });
}

export const getRoomIdAndNumberApi = (id) => {
  return request.request({
    url: `/admin/room/gets/${id}`,
    method: "POST",
  });
}


// 删除
export const deleteRoomById = (id) => {
  return request.request({
    url: `/admin/room/delete/${id}`,
    method: "get",
  });
}

//获取房间类型
export const getRoomType = () => {
  return request.request({
    url: `/admin/room/type`,
    method: "get",
  });
}

//更新
export const updateRoom = (RoomRequestData) => {
  return request.request({
    url: `/admin/room/update`,
    data:RoomRequestData,
    method: "post",
  });
}


//添加
export const addRoom = (RoomRequestData) => {
  return request.request({
    url: `/admin/room/add`,
    data:RoomRequestData,
    method: "post",
  });
}